package com.dwb.service;

import com.dwb.entity.SShenpi;
import com.dwb.mappers.SShenpiMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.Map;

/**
 * @Author manke
 * @Date 2020/6/28 21:01
 * @Version 0.0.1
 */
@Service
public class SShenpiService {
    @Autowired
    private SShenpiMapper sShenpiMapper;
    public void updateState(Map<String, String> parameters) {
        SShenpi sShenpi = new SShenpi();


        Example example = new Example(SShenpi.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("tId",Integer.parseInt(parameters.get("id")));
        sShenpiMapper.updateByExampleSelective(sShenpi,example);

    }
}
